Repository navigation
Apply each sync Change in one task at a time per channel and user - #6424
Open
rtibblesbot wants to merge 3 commits into
Open
rtibblesbot wants to merge 3 commits into
rtibblesbot wants to merge 3 commits into
Conversation
rtibblesbot
force-pushed
the
issue-6423-e948e7
branch
from
November 16, 2026 18:31
1ad9746 to
75a8dcc
Compare
rtibblesbot
marked this pull request as ready for review
November 16, 2026 18:32
Requeue built the signature from override kwargs only, so the requeued task's signature didn't match its kwargs and deduplication missed it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Holds a non-blocking session-level lock across the transactions committed inside it, releasing it on exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Concurrent apply_*_changes tasks for the same channel or user applied the same changes twice, raising IntegrityError on duplicate creates. A task that can't take the lock exits; the holder requeues for changes that arrive before it releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6423-e948e7
branch
from
November 18, 2026 03:13
75a8dcc to
dc788c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
References
Fixes #6423. Fixes STUDIO-J4J.
Reviewer guidance
Suggested review: Full code review.
Engineer review
client_rev; the branch makes change tasks exclusive per channel/user instead, since Sentry shows concurrent tasks.contentcuration/contentcuration/db/advisory_lock.py:109.exists()requeues that work —contentcuration/contentcuration/tasks.py:51.apply_user_changestakes a per-user lock too, though Sentry shows no events for it —contentcuration/contentcuration/tasks.py:64.Engineer evidence
exists()check requeues them. Is exiting rather than waiting wanted?apply_user_changestakes a per-user lock too, though Sentry shows no failures for it; keep it?AI usage
Used Claude Code to trace the duplicate tasks from Sentry events and write the fix and tests. Verified with the full Python test suite and a real-Postgres lock contention test.
Written by rtibblesbot, an LLM-based coding agent.
🟡 Waiting for feedback
WAITING · for reviewLast updated: 2026-11-18 03:14 UTC